package com.itheima.Overload;

public class Test03 {
    public static void main(String[] args) {
        int []arr={33,22,11};
        int[] brr = method(arr);
        System.out.print("[");
        for (int i = 0; i < brr.length; i++) {
            if (i==brr.length-1){

                System.out.println(brr[i]+"]");
            }else {
                System.out.print(brr[i]+",");
            }
        }
    }
    public static void method1(){
    }


    public static boolean method1(int n){
        if(n < 10){
            return false;
        }else if(n > 10){
            return true;
        }
        return false;
    }
    public static  int[] method(int []arr){
        int temp=0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]>arr[i+1]) {
                temp=arr[i];
                arr[i]=arr[i+1];
                arr[i+1]=temp;
                if (i+1>arr.length-1){
                    break;
                }
            }
        }
        return arr;
    }
}
